package contrib

import (
	"fmt"
)

/*
middleware 设计与规范
1，middleware 里存数字内容的字符串值，由枚举获取，防止相同字段出现诡异bug
2，存储的struct，一律应为指针
3，
*/
type ginMiddlewareKey int

func (m ginMiddlewareKey) String() string {
	return fmt.Sprintf("%d", m)
}

const (
	_ ginMiddlewareKey = iota
	keyUser
	keyToken
	keyTokenObject // 存储 devmodel 里的 token 记录
	keyUserId
	keyPageNum
	keyPageCount
	keyRequestObject
	keyUserDevice
	keyAlbum
	keyFile
)
